package com.fengxing.ams.web.facade;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fengxing.ams.web.facade.intf.INavFacade;
import com.fengxing.ams.web.facade.mouble.nav.INavDAO;
import com.fengxing.ams.web.facade.mouble.nav.NavVO;
import com.fengxing.ams.web.facade.mouble.word.ProfessionalWordVO;

@Service
public class NavFacade implements INavFacade {

	@Autowired
	private INavDAO navDAO;

	public List<NavVO> findAll() {
		 return navDAO.findAllEnable();
	}

	@Transactional(readOnly=false)
	public void addNav(NavVO vo) {
		vo.setEnable(0);
		vo.setParent(0);
		vo.setSort(0);
		this.navDAO.save(vo);
	}

}